package com.ssd.controller.operation;

import com.ssd.service.ICouponWriteOffService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "运营端-优惠券领取详情控制器")
@RequestMapping("/operation/couponWriteOff")
@RestController("operationCouponWriteOffController")
public class CouponWriteOffController {
    @Resource
    private ICouponWriteOffService couponWriteOffService;

    /**
     * 查询活动的优惠券的使用数量
     */
    @ApiOperation("查询活动的优惠券的使用数量")
    @GetMapping(value = "/count/{id}")
    public Integer getActivityCouponCount(@PathVariable("id") Long id)
    {
        return  couponWriteOffService.getActivityCouponCount(id);

    }

}
